# -*- coding: utf-8 -*-
"""
Created on Wed Jun  1 05:55:23 2022

@author: zhao
"""

from scipy.special import jv #导入Bessel函数
import numpy as np
import matplotlib.pyplot as plt
import scienceplots
x=np.linspace(0,10,100)
plt.style.use('science') # 这个需要单独安装
plt.figure(1,dpi=300)  
for n in (0,1,2,3):
    plt.plot(x, jv(n,x),linewidth = '0.7',label=r'$m $='+str("{:.2f}".format(n))) 

plt.plot(x,np.zeros(100),linewidth = '0.1',color='black') 
plt.title('Bessel function')
plt.xlabel(r'$x$')
plt.ylabel(r'$J_{m} (x)$')
# plt.ylim(-1,1)
#plt.legend(loc='upper right')
plt.legend()
name='./positive_integer_Bessel.png'

plt.savefig(name,dpi=300)
plt.show() 